<template>
  <div id="app-container">
    <div class="main-content">
      <div class="graph-section">
        <GraphViewer />
      </div>
      <div class="info-section">
        <InfoPanel />
      </div>
    </div>
    <div class="sidebar">
      <ChatPanel />
    </div>
  </div>
</template>

<script setup>
import GraphViewer from './components/GraphViewer.vue';
import ChatPanel from './components/ChatPanel.vue';
import InfoPanel from './components/InfoPanel.vue';
</script>

<style>
/* 全局样式 */
html, body, #app {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  overflow: hidden;
}

#app-container {
  display: flex;
  height: 100vh;
}

.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.graph-section {
  flex-grow: 1; /* 占据大部分垂直空间 */
  min-height: 0; /* flexbox bug fix */
}

.info-section {
  flex-basis: 180px; /* 固定高度 */
  flex-shrink: 0;
  overflow-y: auto;
  border-top: 1px solid #ddd;
}

.sidebar {
  flex-basis: 350px; /* 固定宽度 */
  flex-shrink: 0;
}
</style>